#ifndef __PROTOCOLS__OM__OmTransType_h__
#define __PROTOCOLS__OM__OmTransType_h__

namespace Greatewall
{
    namespace Protocols
    {
        namespace OM
        {
            template <typename T>
            class OmTx;

            template <typename T>
            class OmTx<T&>
            {
            public:
                OmTx(T& tx) : _tx(tx), _size(sizeof(TYPE))
                {}

                T&
                operator ()()
                { return _tx; }

                unsigned
                size()
                { return _size; }

            private:
                T&       _tx;
                unsigned _size;

            private:
                union TYPE
                {
                    T t;
                };
            };
        }
    }
}
#endif
